package com.cqsxxy.controller;

import com.cqsxxy.pojo.User;
import com.cqsxxy.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@Controller
public class LoginController {
    @Autowired
    IUserService userService;

    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    @ResponseBody
    @RequestMapping("/shiro")
    public HashMap<String,Object> shiro(User user){
        return userService.shiro(user);
    }
}
